From 6be2073740bea7e4dbcb59123762aaea52913314 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 5 Nov 2015 19:15:43 -0500 Subject: [PATCH] Adwaita: Redo combo box entry styling Instead of relying on .linked or + (which doesn't work right in rtl), use :not(:only-child) to select a button that is not alone inside a combobox. --- gtk/theme/Adwaita/_common.scss | 4 ++-- gtk/theme/Adwaita/gtk-contained-dark.css | 10 ++++++---- gtk/theme/Adwaita/gtk-contained.css | 10 ++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index a533fc9de6..dac1b0c4c9 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -959,7 +959,7 @@ combobox { // always disable separators -GtkWidget-wide-separators: true; } - & entry.combo { + & > entry.combo { &:dir(ltr) { border-top-right-radius: 0; border-bottom-right-radius: 0; @@ -969,7 +969,7 @@ combobox { border-bottom-left-radius: 0; } } - & button.combo { + & > button.combo:not(:only-child) { &:dir(ltr) { border-top-left-radius: 0; border-bottom-left-radius: 0; diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 9d0518aafc..fe41669905 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -1460,17 +1460,19 @@ combobox { text-shadow: none; } combobox.separator.vertical { -GtkWidget-wide-separators: true; } - combobox entry.combo:dir(ltr), combobox spinbutton.combo:dir(ltr) { + combobox > entry.combo:dir(ltr), combobox > spinbutton.combo:dir(ltr) { border-top-right-radius: 0; border-bottom-right-radius: 0; } - combobox entry.combo:dir(rtl), combobox spinbutton.combo:dir(rtl) { + combobox > entry.combo:dir(rtl), combobox > spinbutton.combo:dir(rtl) { border-top-left-radius: 0; border-bottom-left-radius: 0; } - combobox button.combo:dir(ltr) { + combobox > button.combo:not(:only-child):dir(ltr), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(ltr), + .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(ltr) { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: none; } - combobox button.combo:dir(rtl) { + combobox > button.combo:not(:only-child):dir(rtl), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(rtl), + .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(rtl) { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: none; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index e26f4071c6..fb4a8f57f9 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -1460,17 +1460,19 @@ combobox { text-shadow: none; } combobox.separator.vertical { -GtkWidget-wide-separators: true; } - combobox entry.combo:dir(ltr), combobox spinbutton.combo:dir(ltr) { + combobox > entry.combo:dir(ltr), combobox > spinbutton.combo:dir(ltr) { border-top-right-radius: 0; border-bottom-right-radius: 0; } - combobox entry.combo:dir(rtl), combobox spinbutton.combo:dir(rtl) { + combobox > entry.combo:dir(rtl), combobox > spinbutton.combo:dir(rtl) { border-top-left-radius: 0; border-bottom-left-radius: 0; } - combobox button.combo:dir(ltr) { + combobox > button.combo:not(:only-child):dir(ltr), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(ltr), + .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(ltr) { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: none; } - combobox button.combo:dir(rtl) { + combobox > button.combo:not(:only-child):dir(rtl), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(rtl), + .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(rtl) { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: none; } -- 2.30.2